/*
 * CStatus.java
 *
 * Copyright (c) 2009 Giles Millward (Manigra). All rights reserved.
 *
 * This file is part of JRogueDPS.
 *
 * JRogueDPS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * JRogueDPS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with JRogueDPS.  If not, see <http://www.gnu.org/licenses/>.
 */

package utility;

import java.awt.Dimension;
import javax.swing.JLabel;
import javax.swing.JProgressBar;

/**
 *
 * @author gmillward
 */
public class CStatus {
    static JLabel m_statusText;
    static boolean m_idle = true;

    public static void initProgressBar(JLabel p_text)
    {
        m_statusText = p_text;
        m_idle = true;
    }

    public static void idleStatus()
    {
        m_statusText.setText("Idle");
        m_idle = true;
    }

    public static void setStatus(String p_text)
    {
        m_statusText.setText(p_text);
        m_statusText.validate();
        Dimension l_dimPanel = m_statusText.getSize();
        m_statusText.paintImmediately(0,0,l_dimPanel.width, l_dimPanel.height);  
    }
}
